package com.aspose.cells;

class zbxj extends zcdb {
   zbxj() {
      this.d = 1048;
   }

   void a(FormatCondition var1) throws Exception {
      zcbx var2 = new zcbx(var1);
      int var3 = 66 + var2.c();
      int var4 = var1.getType();
      String var5 = var1.getText();
      if (var5 != null) {
         var3 += 4 + var5.length() * 2;
      }

      int var6;
      this.c = new byte[var3];
      var6 = var2.b(this.c, 0);
      label72:
      switch(var4) {
      case 0:
         this.c[var6 + 0] = 1;
         this.c[var6 + 4] = 0;
         this.c[var6 + 16] = (byte)zcee.b(var1.getOperator());
         break;
      case 1:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 0;
         break;
      case 2:
         this.c[var6 + 0] = 3;
         this.c[var6 + 4] = 2;
         break;
      case 3:
         this.c[var6 + 0] = 4;
         this.c[var6 + 4] = 3;
         break;
      case 4:
         this.c[var6 + 0] = 6;
         this.c[var6 + 4] = 4;
         break;
      case 5:
         this.c[var6 + 0] = 5;
         this.c[var6 + 4] = 5;
         this.c[var6 + 16] = (byte)var1.getTop10().getRank();
         break;
      case 6:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 7;
         break;
      case 7:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 27;
         break;
      case 8:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 8;
         this.c[var6 + 16] = 0;
         break;
      case 9:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 8;
         this.c[var6 + 16] = 1;
         break;
      case 10:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 8;
         this.c[var6 + 16] = 2;
         break;
      case 11:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 8;
         this.c[var6 + 16] = 3;
         break;
      case 12:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 9;
         break;
      case 13:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 10;
         break;
      case 14:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 11;
         break;
      case 15:
         this.c[var6 + 0] = 2;
         this.c[var6 + 4] = 12;
         break;
      case 16:
         switch(var1.getTimePeriod()) {
         case 0:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 15;
            break label72;
         case 1:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 17;
            break label72;
         case 2:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 16;
            break label72;
         case 3:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 18;
            break label72;
         case 4:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 24;
            break label72;
         case 5:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 19;
            break label72;
         case 6:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 20;
            break label72;
         case 7:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 21;
            break label72;
         case 8:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 23;
            break label72;
         case 9:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 22;
            break label72;
         default:
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 15;
            break label72;
         }
      case 17:
         AboveAverage var7 = var1.getAboveAverage();
         System.arraycopy(com.aspose.cells.b.a.zc.a(var7.getStdDev()), 0, this.c, var6 + 16, 4);
         if (var7.isAboveAverage()) {
            if (var7.isEqualAverage()) {
               this.c[var6 + 0] = 2;
               this.c[var6 + 4] = 29;
            } else {
               this.c[var6 + 0] = 2;
               this.c[var6 + 4] = 25;
            }
         } else if (var7.isEqualAverage()) {
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 30;
         } else {
            this.c[var6 + 0] = 2;
            this.c[var6 + 4] = 26;
         }
      }

      if (var1.getType() == 3) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((int)-1), 0, this.c, var6 + 12, 4);
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.d()), 0, this.c, var6 + 8, 4);
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.getPriority()), 0, this.c, var6 + 12, 4);
      }

      byte var9 = 0;
      if (var1.getStopIfTrue()) {
         var9 = (byte)(var9 | 2);
      }

      if (var1.getTop10() != null && var1.getTop10().isBottom()) {
         var9 = (byte)(var9 | 8);
      }

      if (var1.getTop10() != null && var1.getTop10().isPercent()) {
         var9 = (byte)(var9 | 16);
      }

      this.c[var6 + 28] = var9;
      if (var2.c != null) {
         for(int var8 = 0; var8 < var2.c.length; ++var8) {
            System.arraycopy(var2.c[var8], 0, this.c, var6 + 30 + var8 * 4, 4);
         }
      }

      var6 += 46;
      byte[] var10 = var1.b().a();
      System.arraycopy(var10, 0, this.c, var6, 16);
      this.c[var6 + 16] = 1;
      var6 += 20;
      if (var5 != null) {
         zcch.a(this.c, var6, var5);
      }

   }
}
